﻿using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml;

namespace HOBA.SMSSender
{
    [System.Web.Services.WebServiceBindingAttribute(Name = "MySoapService", Namespace = "http://tempuri.org/")]
    public class MySoapService: SoapHttpClientProtocol
    {
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        public MySoapService(string url)
        {
            this.Url = url;
        }

        /// <summary>
        /// Return current service provider.
        /// </summary>
        /// <returns>Service provider's information.</returns>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/About", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string About()
        {
            object[] results = this.Invoke("About", new object[0]);
            return ((string)results[0]);
        }

        /// <summary>
        /// Check valid account.
        /// </summary>
        /// <param name="clientNo">ID of the account;</param>
        /// <param name="clientPass">Password of the account.</param>
        /// <returns>Account validation information.</returns>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckClient", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string CheckClient(string clientNo, string clientPass)
        {
            object[] results = this.Invoke("CheckClient", new object[2] { clientNo, clientPass });
            return ((string)results[0]);
        }

        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetClientBalance", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string GetClientBalance(string clientNo, string clientPass, string serviceType)
        {
            object[] results = this.Invoke("CheckClient", new object[3] { clientNo, clientPass, serviceType });
            return ((string)results[0]);
        }

        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetClientCommingSMSNotDividePage", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string GetClientCommingSMSNotDividePage(string clientNo, string clientPass, DateTime fromDate, DateTime toDate, string status, string serviceTypeID, string key)
        {
            object[] results = this.Invoke("GetClientCommingSMSNotDividePage", new object[7] { clientNo, clientPass, fromDate.ToString("M/d/yyyy"), toDate.ToString("M/d/yyyy"), status, serviceTypeID, key });
            return ((string)results[0]);
        }

        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetTotalPageOfClientSMS", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string GetTotalPageOfClientSMS(string clientNo, string clientPass, string key)
        {
            object[] results = this.Invoke("GetTotalPageOfClientSMS", new object[3] { clientNo, clientPass, key });
            return ((string)results[0]);
        }

        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetClientSMSListOfPage", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string GetClientSMSListOfPage(string clientNo, string clientPass, string pageNO, DateTime fromDate, DateTime toDate, string status, string serviceTypeID, string key)
        {
            object[] results = this.Invoke("GetClientSMSListOfPage", new object[8] { clientNo, clientPass, pageNO, fromDate.ToString("M/d/yyyy"), toDate.ToString("M/d/yyyy"), status, serviceTypeID, key });
            return ((string)results[0]);
        }

        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetCommingSMSList", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string GetCommingSMSList(string clientNo, string clientPass, string minutes)
        {
            object[] results = this.Invoke("GetCommingSMSList", new object[3] { clientNo, clientPass, minutes });
            return ((string)results[0]);
        }

        /// <summary>
        /// Send a test message to a mobile phone.
        /// </summary>
        /// <param name="clientNo">ID of the account;</param>
        /// <param name="clientPass">Password of the account;</param>
        /// <param name="phoneNumber">The target phone's number;</param>
        /// <param name="smsMessage">The message needs to be sent;</param>
        /// <param name="smsGUID">An unique id for this message;</param>
        /// <param name="serviceType">Account's service type.</param>
        /// <returns></returns>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendSMS", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public string SendSMS(string clientNo, string clientPass, string phoneNumber, string smsMessage, string smsGUID, string serviceType)
        {
            object[] results = this.Invoke("SendSMS", new object[6] { clientNo, clientPass, phoneNumber, smsMessage, smsGUID, serviceType });
            return ((string)results[0]);
        }
    }
}
